package com.yan.provider.controller;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import com.yan.provider.entity.Project;
import com.yan.provider.service.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yk
 * @date 2021/3/12 9:17
 * @description
 */
@RestController
@RefreshScope
public class controller {

    @Value("${username:123}")
    private String username;


    @RequestMapping("/username")
    public String get() {
        return username;
    }
}
